﻿{include file="common/head"/}
<body>
<div class="page" id="share_code">
    <header class="bar header-initial">
        <a class="external icon pull-left return-icon back" href="javascript:history.back(-1)" ><img src="/static/xigu/picture/return_gray.png" width="100%"></a>
    </header>
    <div class="content code-poster">
        <div class="code-content">
            <div class="logo-box">
                <img class="login-img" src="/static/xigu/picture/login_logo.png" >
            </div>
            <div class="content-box code-box">
                <div class="code-title">邀请码：<span render="user_name">{$user.mobile}</span></div>
                <div class="invite-box">邀请你加入西谷非遗数字资产社区</div>
                <div class="codeimg">
                    <img src="{$img}">
                </div>
                <div class="textbox">长按识别二维码</div>
            </div>
        </div>
    </div>
    
</div>

<script type='text/javascript' src='/static/xigu/js/jquery-3.3.1.min.js' charset='utf-8'></script>
<script type='text/javascript' src='/static/xigu/js/light7.min.js' charset='utf-8'></script>
<script type='text/javascript' src='/static/xigu/js/light7-swiper.min.js' charset='utf-8'></script>
<script type='text/javascript' src='/static/xigu/js/light7-swipeout.js' charset='utf-8'></script>
<script type='text/javascript' src='/static/xigu/js/cn.min.js' charset='utf-8'></script>
<script type='text/javascript' src='/static/xigu/js/layui.js' charset='utf-8'></script>
<script type='text/javascript' src='/static/xigu/js/basis.js' charset='utf-8'></script>

</body>
<script type="text/javascript" charset='utf-8' id="share_code_script">
    layui.loadPage( {
        share_code:function (id) {
            var $this = this;
            //console.log(444);
            layui.use('qrcode',function () {
                $this.sendAjax({s: 'SettleUser.RegCode', root: 'user/user/profile'}, function (d) {
                    var d = {
                        link: d.invite_url,
                        user_name: d.invite_code
                    }
                    var code = $('#share_code .codeimg');
                    code.html('')
                    new QRCode(code[0], {
                      text: d.link,
                      correctLevel : QRCode.CorrectLevel.L
                    });
                    $this.renderHtml(id, d);
                })
            });
        }
    });
</script>
</html>
